package com.survivor.activity;

import java.util.Map;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.AdapterView.OnItemClickListener;

public class NeHeExample extends Activity implements OnItemClickListener{
    /** Called when the activity is first created. */
	
	private ListView mList;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mList = new ListView(this);
        mList.setAdapter(new MyAdapter(this));
        setContentView(mList);
        mList.setOnItemClickListener(this);
    }
	public void onItemClick(AdapterView<?> parent, View v, int position, long arg3) {
		// TODO Auto-generated method stub
		Map map = (Map) parent.getItemAtPosition(position);
		Class c = (Class)(map.get("class"));
		Intent i = new Intent(this, c);
		startActivity(i);
	}
}